<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>js 的基础语法</title>
</head>
<body>
    <script>
        var x;
        let y=5;
        const PI=3.14;
        console.log(x,y,PI);
        let name='如花';
        console.log(name);
        let empty_value=null;
        console.log(empty_value);
        let age=18;
        if(age>18){
            console.log("你已经成年了");
        }else{
            console.log("未成年");
        }
        let time=12;
        if(time<12){
            alert("上午好");
        }else if(time<18){
            alert("下午好")
        }else{
            alert("晚上好")
        }
        for(let i=0;i<10;i++){
            console.log(i);
        }
        let count=1;
        while(count<=10){
            console.log(count);
            count++;
        }
    </script>
</body>
</html>